package com.weiyi.portal.config;

import com.weiyi.portal.modules.ums.service.UmsMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.security.core.userdetails.UserDetailsService;
import weiyi.security.config.SecurityConfig;

public class PortalSecurityConfig extends SecurityConfig {

    @Autowired
    UmsMemberService umsMemberService;

    @Bean
    public UserDetailsService userDetailsService(){
        return username -> umsMemberService.loadUserByUserName(username);
    }
}
